package com.zhifei.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhifei.system.domain.JdPositionEntity;
import com.zhifei.system.domain.XrxsPositionEntity;
import com.zhifei.system.mapper.JdPositionMapper;
import com.zhifei.system.service.JdPositionService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JdPositionServiceImpl extends ServiceImpl<JdPositionMapper, JdPositionEntity> implements JdPositionService {

    @Override
    public JdPositionEntity getByPositionName(String positionName) {
        JdPositionEntity entity = null;
        QueryWrapper wrapper = new QueryWrapper();
        wrapper.eq("name",positionName);
        List<JdPositionEntity> list = baseMapper.selectList(wrapper);
        if(list!=null && list.size()>0){
            entity = list.get(0);
        }
        return entity;
    }

}
